﻿{include file="public/header" /}
<title></title>
</head>

<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> OEM管理
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="page-container">
	<div class="page-container">
		<div>总计金额：<span style="color: red">&nbsp;<?php  echo substr($sum['sum'],0,strlen($sum['sum'])-2);?></span>
			总计鼓励金：<span style="color: red">&nbsp;{$sum['sums']}</span>
		</idv>
	</div>
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr class="text-c">
				<th width="40">ID</th>
				<th>项目名</th>
				<th>用户名</th>
				<th>省代</th>
				<th>余额</th>

				<th>鼓励金</th>
				<th>认证</th>
				<th width="130">状态</th>
				<th width="130">增加时间</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="data" id="vo" empty="这里没有数据"}
			<tr class="text-c">
				<td>{$vo.id}</td>
				<td>{$vo.user_name}</td>
				<td>{$vo.mobile}</td>
				<td>{$vo.pname}</td>
				<td><a href="{:url('accounts/oemye',['oem_id'=>$vo.id,'type'=>3])}"><?php echo substr($vo['balance'],0,strlen($vo['balance'])-2)?></a></td>
				
				<td><a href="{:url('accounts/oemglj',['oem_id'=>$vo.id,'type'=>3])}"><?php echo substr($vo['score'],0,strlen($vo['score']))?></a></td>
				<td>					
					{switch name="$vo.is_verify"}
					    {case value="1"}<a href="{:url('accounts/renzhenginfo',['id'=>$vo.id])}" class="edit">已认证</a>{/case}
					    {case value="2"}<a href="{:url('accounts/renzhenginfo',['id'=>$vo.id])}" class="edit">待审核</a>{/case}
					    {case value="3"}<a href="{:url('accounts/renzhenginfo',['id'=>$vo.id])}" class="edit">已驳回</a>{{/case}
					    {default /}未认证
					{/switch}					
				</td>
				<td>
					{if $vo.status==1}
					正常
					{else /}
					冻结
					{/if}
				</td>
				<td>{$vo.add_time}</td>
				<td class="td-manage">
					<a title="冻结" href="javascript:;" onclick="complain_del(this,{$vo.id},{$vo.status})" class="ml-5" style="text-decoration:none">					
					{if $vo.status==1}
					<span style="color: red;">冻结</span>
					{else /}
					<span style="color: green;">激活</span>
					{/if}</a>
				</td>
			</tr>
			{/volist}
			</tbody>
			</table>
		</div>
		{include file="public/footer" /}
		<script type="text/javascript">
			/*管理员-删除*/
			function complain_del(obj, id, status) {
				var tiele = '';
				if(status==1){
					tiele = '确认要冻结吗？';
				}else{
					tiele = '确认要激活吗？';
				}
				layer.confirm(tiele, {
					btn: ['确定', '取消'] //按钮
				}, function() {
					$.ajax({
						type: 'get',
						url: "{:url('accounts/complain_frozen')}",
						dataType: 'json',
						data: {
							id: id,
							status: status
						},
						success: function(data) {
							if(data.code == 200) {
								layer.msg(data.msg, {
								  icon: 1,
								  time: 1000 //2秒关闭（如果不配置，默认是3秒）
								}, function(){
									location.href = "{:url('accounts/agency_id2')}";
								});
							} else {
								layer.msg(data.msg, {
									icon: 1,
									time: 1000
								});
							}
						},
						error: function(data) {
							console.log(data.msg);
						}
					});
				});				
			}

		</script>